from collections import Counter


def check_list(list1, list2):
    return Counter(list1) == Counter(list2)


def check_dict(dict1, dict2):
    # 检查所有键是否相同
    if set(dict1.keys()) != set(dict2.keys()):
        return False

    # 对于每个键，比较对应的列表
    for key in dict1:
        if check_list(dict1[key], dict2[key]) is False:
            return False

    return True
